package sieve

const testVersion = 1

func Sieve(givenNumber int) (primes []int) {
	primes = append(primes, 2)

	for i := 3; i <= givenNumber; i++ {
		isPrime := true
		for _, v := range primes {
			if i%v == 0 {
				isPrime = false
				break
			}
		}

		if isPrime {
			primes = append(primes, i)
		}
	}

	return
}
